package com.djakapm.swing.container;

import java.awt.BorderLayout;

import javax.swing.JComponent;
import javax.swing.JPanel;

public class BorderPanel extends JPanel {
	private static final long serialVersionUID = 4969482065382749588L;
	
	public BorderPanel() {
		this.setLayout(new BorderLayout());
	}
	
	public BorderPanel(int hgap,int vgap) {
		this.setLayout(new BorderLayout(hgap,vgap));
	}

    public BorderPanel addToCenter(JComponent component){
        this.add(component,BorderLayout.CENTER);
        return this;
    }

	public BorderPanel addToWest(JComponent component) {
		this.add(component,BorderLayout.WEST);
        return this;
	}
	
	public BorderPanel addToEast(JComponent component) {
		this.add(component,BorderLayout.EAST);
        return this;
	}
	
	public BorderPanel addToNorth(JComponent component) {
		this.add(component,BorderLayout.NORTH);
        return this;
	}
	
	public BorderPanel addToSouth(JComponent component) {
		this.add(component,BorderLayout.SOUTH);
        return this;
	}
	

}
